"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.processMiddlewares = void 0;
function processMiddlewares(req, res, handles) {
    let i = 0;
    function callNext() {
        let crt = handles[i];
        crt(req, res, () => {
            if (i < handles.length - 1) {
                i++;
                callNext();
            }
        });
    }
    callNext();
}
exports.processMiddlewares = processMiddlewares;
